#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <iostream>
#include <QtGui/QMainWindow>
#include <QtGui/QDirModel>
#include <QtGui/QActionGroup>
#include <QtGui/QFileDialog>
#include <log4cxx/logger.h>
#include "glwidget.h"
#include <QtCore/QList>


class MainWindow : public QMainWindow
{

	Q_OBJECT

public:
	MainWindow();
	void resizeGL(int w, int h);

protected:
    void closeEvent(QCloseEvent *event);

public slots:
	void open();
    bool save();
    bool saveAs();
	void about();
	void updateStatusBar();	

private:
	
	void createActions();
    void createMenus();
	void createToolBars();
    void createStatusBar();
	void createTreeView();
    void createGLWidget();
	void updateTreeView(QString path);

	QMenu *fileMenu;
	QMenu *editMenu;	
    QMenu *helpMenu;
    QToolBar *fileToolBar;
	QAction *openAction;
    QAction *saveAction;
    QAction *saveAsAction;
    QAction *exitAction;
	QAction *aboutAction;

	QActionGroup *mouseGroup;

	QDirModel *dirModel1;
	QFileDialog *fileDialog1;	
	GLWidget *openglwidget;

	static log4cxx::LoggerPtr m_log;
};

#endif